#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>

int main(void)
{
    printf("%s\n",
           "Content-Type:text/html;charset=iso-8859-1");
    printf("%s\n",
           "Access-Control-Allow-Credentials: true");
    printf("%s%c%c\n",
           "Access-Control-Allow-Origin: *", 13, 10);

    int fd = open("/mnt/yaffs2/Cdatabox/test/ID", O_RDONLY);
    if (fd < 0)
    {
        printf("Imei:operation failed\n");
        return -1;
    }

    char imei[128] = {0};
    int rc = read(fd, imei, sizeof(imei) - 1);
    if (rc < 0)
    {
        printf("Imei:operation failed\n");
        close(fd);
        return -1;
    }
    else
    {
        printf("%s\n", imei);
    }

    close(fd);
    return 0;
}
